package com.dstz.bus.util;

import com.dstz.base.core.cache.ICache;
import com.dstz.base.core.util.AppUtil;
import com.dstz.bus.model.BusinessTable;

/**
 * <pre>
 * 描述：BusinessTable的缓存工具类
 * 作者:aschs
 * 邮箱:aschs@qq.com
 * 日期:2018年5月15日
 * 版权:summer
 * </pre>
 */
public class BusinessTableCacheUtil {
	private static final String BUSINESS_TABLE_MAP = "businessTableMap";

	private BusinessTableCacheUtil() {

	}

	public static void put(BusinessTable businessTable) {
		AppUtil.getBean(ICache.class).add(BUSINESS_TABLE_MAP + "_" + businessTable.getKey(), businessTable);
	}

	public static BusinessTable get(String key) {
		return (BusinessTable) AppUtil.getBean(ICache.class).getByKey(BUSINESS_TABLE_MAP + "_" + key);
	}

}
